<template>
    <div id="app">
      <ul>
        <!-- v-for遍历数组渲染到页面 -->
        <li  v-for="item in myArr" :key="item">{{ item }}</li>
      </ul>
      <!-- 注册点击事件 -->
      <button @click="btn">走一走</button>
    </div>
  </template>
  
  <script>
  export default {
    data() {
      return {
        myArr: ["帅哥", "美女", "程序猿"],
      };
    },
    methods: {
     btn(){
        this.myArr.push(this.myArr[0])
        this.myArr.shift()
     }
    },
  };
  </script>

  <style>
.red_Str{
  background-color: aqua;
}
</style>